﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPageAdmin.master" AutoEventWireup="true" CodeFile="Quanlytuvan.aspx.cs" Inherits="admin_Quanlytuvan" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script src="../Scripts/scw.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

     <div style="border:1px solid gray;width:100%;height:auto;margin-bottom:20px;">
        <div style="width:100%;background-color:black;color:White;font-weight:bold;text-align:center;font-size:large">Quản Lý Tư Vấn - Làm Đẹp</div>
        <div>
            <table style="width: 100%;">
                <tr>
                    <td align="center" style="padding-left:20px;width:100px">
                       <a href="capnhattuvan.aspx">
                        <img alt="" class="style1" src="../images/Add-Folder-icon.png" /><asp:Label 
                            ID="Label1" runat="server" Text="Thêm Mới" Font-Bold="True" 
                            ForeColor="Red"></asp:Label>
                        </a>
                    </td>
                    <td>
                        &nbsp;
                        <asp:HiddenField ID="hdtimkiem" runat="server" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div style="border:1px solid gray;width:100%;height:auto;margin-bottom:20px;">
        <div style="width:100%;background-color:black;color:White;font-weight:bold;margin:0px 0 5px 0">
            Danh Sách Các Tư Vấn - Làm Đẹp</div>
        <div style="padding-left:20px;padding-top:10px;padding-bottom:10px">
            Từ ngày:<asp:TextBox ID="txttungay" runat="server"></asp:TextBox>
            &nbsp;<img alt="Click here to select date" height="13" 
                onclick="scwShow(scwID('<%=txttungay.ClientID %>'),event);" 
                src="../images/icon_calendar.gif" width="15" /><asp:RequiredFieldValidator 
                ID="RequiredFieldValidator1" runat="server" ControlToValidate="txttungay" 
                ErrorMessage="*"></asp:RequiredFieldValidator>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            Đến ngày:<asp:TextBox ID="txtdenngay" runat="server"></asp:TextBox>
            <img alt="Click here to select date" height="13" 
                onclick="scwShow(scwID('<%=txtdenngay.ClientID %>'),event);" 
                src="../images/icon_calendar.gif" width="15" /><asp:RequiredFieldValidator 
                ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtdenngay" 
                ErrorMessage="*"></asp:RequiredFieldValidator>
            <asp:ImageButton 
                ID="imgbtsearch" runat="server" ImageUrl="~/images/page-search-icon.png" 
                onclick="imgbtsearch_Click" />
        </div>
        <div style="padding-left:20px">
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txttungay" ErrorMessage="Từ ngày :Sai định dạng(MM/dd/yyyy)" 
                ValidationExpression="\d{2}/\d{2}/\d{4}"></asp:RegularExpressionValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                ControlToValidate="txtdenngay" ErrorMessage="Đến ngày :Sai định dạng(MM/dd/yyyy)" 
                ValidationExpression="\d{2}/\d{2}/\d{4}"></asp:RegularExpressionValidator>
            <asp:HiddenField ID="HiddenField1" runat="server" />
        </div>
        <div style="padding-left:20px;padding-top:10px;padding-bottom:10px">
            <asp:GridView ID="gvDanhSachTuvan" runat="server" Width="93%" CellPadding="4" 
                EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
                PagerSettings-PreviousPageText="&lt;&lt;" AllowPaging="True" 
                AutoGenerateColumns="False" 
                onselectedindexchanged="gvDanhSachTuvan_SelectedIndexChanged" 
                onpageindexchanging="gvDanhSachTuvan_PageIndexChanging" 
                onrowdatabound="gvDanhSachTuvan_RowDataBound" 
                onrowdeleting="gvDanhSachTuvan_RowDeleting">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:TemplateField HeaderText="STT">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text="<%# Container.DataItemIndex + 1 %>"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="TieuDe" HeaderText="Tiêu Đề" >
                    <ItemStyle Font-Bold="True" ForeColor="#FF9900" HorizontalAlign="Center" 
                        VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Hình">
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" Height="60px" 
                                ImageUrl='<%# "~/Images/TuVan/"+Eval("HinhDaiDien")+".jpg" %>' 
                                Width="60px" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="NgayNhap" HeaderText="Ngày Đăng" >
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Nguon" HeaderText="Nguồn" >
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150px" />
                    </asp:BoundField>
                    <asp:CommandField ButtonType="Image" HeaderText="Sửa" 
                        SelectImageUrl="~/images/file-edit-icon.png" ShowSelectButton="True" >
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                    </asp:CommandField>
                    <asp:CommandField ButtonType="Image" DeleteImageUrl="~/images/Close-2-icon.png" 
                        HeaderText="Xóa" ShowDeleteButton="True" >
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                    </asp:CommandField>
                    <asp:TemplateField HeaderText="Active">
                        <ItemTemplate>
                            <asp:ImageButton ID="Imagebtnactive" runat="server" 
                                ImageUrl="~/images/go-back-icon.png" CommandArgument='<%# Eval("idtv") %>' 
                                onclick="ImageActive_Click" CausesValidation="False" />
                            <asp:HiddenField ID="hdidtv" runat="server" Value='<%# Eval("idtv") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="60px" />
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />

<PagerSettings PreviousPageText="&lt;&lt;" NextPageText="&amp;gt;&amp;gt;"></PagerSettings>

                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    Font-Size="Medium" Font-Underline="True" />
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            </asp:GridView>
        </div>
    </div>

</asp:Content>

